<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    function f(arr){
        var count = 0;
        for (var i = 0; i < arr.length; i++) {
            if (arr[i]%2!=0){
                count++;
            }
        }
        return (count/arr.length);
    }
    var arr =[7,9,6,2,5,1,0,3,8,4];
    const radio =f(arr);
        console.log((radio*100)+'%')
</script>

<script>
    var arr =[7,9,6,2,5,1,0,3,8,4];
    var a = Math.max(7,9,6,2,5,1,0,3,8,4);
    console.log(a);
    console.log(arr.indexOf(a));

    var b = Math.min(7,9,6,2,5,1,0,3,8,4);
    console.log(b);
    console.log(arr.indexOf(b));
</script>
<script>
    var arr =[7,9,6,2,5,1,0,3,8,4];
    for (var i = 0; i < arr.length; i++) {
        for (var j = 0; j <arr.length-i-1 ; j++) {
            if (arr[j]>arr[j+1]){
                var temp =arr[j];
                arr[j]=arr[j+1];
                arr[j+1]=temp;
            }
        }
    }
    for (var i = 0; i < arr.length; i++) {
        console.log(arr[i]);
    }
</script>
</body>
</html>